<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Cfw\V20190904\Models;
use TencentCloud\Common\AbstractModel;

/**
 * AddEnterpriseSecurityGroupRules request structure.
 *
 * @method array getData() Obtain Creates rule data
 * @method void setData(array $Data) Set Creates rule data
 * @method integer getType() Obtain Adding type. 0: add to the end; 1: add to the front; 2: insert. Default: 0
 * @method void setType(integer $Type) Set Adding type. 0: add to the end; 1: add to the front; 2: insert. Default: 0
 * @method string getClientToken() Obtain An identifier to ensure the idempotency of the request. The value of the ClientToken parameter is a unique string that is generated by your client and can contain up to 64 ASCII characters in length.
 * @method void setClientToken(string $ClientToken) Set An identifier to ensure the idempotency of the request. The value of the ClientToken parameter is a unique string that is generated by your client and can contain up to 64 ASCII characters in length.
 * @method integer getIsDelay() Obtain Indicates whether to delay publishing. 1: delay; other values: do not delay
 * @method void setIsDelay(integer $IsDelay) Set Indicates whether to delay publishing. 1: delay; other values: do not delay
 */
class AddEnterpriseSecurityGroupRulesRequest extends AbstractModel
{
    /**
     * @var array Creates rule data
     */
    public $Data;

    /**
     * @var integer Adding type. 0: add to the end; 1: add to the front; 2: insert. Default: 0
     */
    public $Type;

    /**
     * @var string An identifier to ensure the idempotency of the request. The value of the ClientToken parameter is a unique string that is generated by your client and can contain up to 64 ASCII characters in length.
     */
    public $ClientToken;

    /**
     * @var integer Indicates whether to delay publishing. 1: delay; other values: do not delay
     */
    public $IsDelay;

    /**
     * @param array $Data Creates rule data
     * @param integer $Type Adding type. 0: add to the end; 1: add to the front; 2: insert. Default: 0
     * @param string $ClientToken An identifier to ensure the idempotency of the request. The value of the ClientToken parameter is a unique string that is generated by your client and can contain up to 64 ASCII characters in length.
     * @param integer $IsDelay Indicates whether to delay publishing. 1: delay; other values: do not delay
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("Data",$param) and $param["Data"] !== null) {
            $this->Data = [];
            foreach ($param["Data"] as $key => $value){
                $obj = new SecurityGroupRule();
                $obj->deserialize($value);
                array_push($this->Data, $obj);
            }
        }

        if (array_key_exists("Type",$param) and $param["Type"] !== null) {
            $this->Type = $param["Type"];
        }

        if (array_key_exists("ClientToken",$param) and $param["ClientToken"] !== null) {
            $this->ClientToken = $param["ClientToken"];
        }

        if (array_key_exists("IsDelay",$param) and $param["IsDelay"] !== null) {
            $this->IsDelay = $param["IsDelay"];
        }
    }
}
